package com.chanjiedata.changbs.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.chanjiedata.changbs.R;
import com.chanjiedata.changbs.help.GlideHelper;
import com.chanjiedata.changbs.proto.MemberOuterClass;

import java.util.List;

/**
 * 文件名 : ProgressAdapter
 * 创建者 : MangoWang
 * 创建日期 : 2019/11/25 11:50
 * 微信 : MangoWaWang
 * 邮箱 : 763482205@qq.com
 * 描述 : TODO
 */

public class DingDanMessageAdapter extends BaseQuickAdapter<MemberOuterClass.Order_list.List_info,BaseViewHolder> {
    public DingDanMessageAdapter(Context context, List<MemberOuterClass.Order_list.List_info> itemList) {
        super(R.layout.item_ding_dan_message,itemList);
    }

    @Override
    protected void convert(BaseViewHolder helper, MemberOuterClass.Order_list.List_info item) {
        GlideHelper.INSTANCE.loadImage(helper.getView(R.id.iv_image),item.getExtendOrderGoodsList().get(0).getGoodsImage());
        helper.setText(R.id.tv_status,item.getStateDesc())
                .setText(R.id.tv_order_number,"订单号："+item.getOrderSn())
                .setText(R.id.tv_goods_name,item.getExtendOrderGoodsList().get(0).getGoodsName())
                .setText(R.id.tv_goods_number,"×"+item.getExtendOrderGoodsList().get(0).getGoodsNum())
                .setText(R.id.tv_time,item.getAddTime());
        
        
    }
}